﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace MasterDetailListSample
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private List<Dummy> lst = new List<Dummy>()
            {
                new Dummy() { Title = "Item A", Desc = "Description for item A" },
                new Dummy() { Title = "Item B", Desc = "Description for item B" },
                new Dummy() { Title = "Item C", Desc = "Description for item C" },
                new Dummy() { Title = "Item D", Desc = "Description for item D" },
                new Dummy() { Title = "Item E", Desc = "Description for item E" },
                new Dummy() { Title = "Item F", Desc = "Description for item F" },
                new Dummy() { Title = "Item G", Desc = "Description for item G" },
                new Dummy() { Title = "Item H", Desc = "Description for item H" },
            };

        public MainWindow()
        {
            InitializeComponent();
            Loaded += (sender, arg) =>
                {
                    MyList.MasterDetailListBox.ItemsSource = lst;
                };
        }
    }

    public class Dummy
    {
        public string Title { get; set; }
        public string Desc { get; set; }
    }
}
